<!--
 * @Author: your name
 * @Date: 2020-08-15 09:13:18
 * @LastEditTime: 2020-08-15 15:02:31
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \cartoon\components\List.vue
-->
<template>
  <div class="home-content-template">
    <div v-for="(item, index) in detail" :key="index" class="recomment-content">
      <div class="w140-187">
        <ImgAspect :lazy="true" :radius="6" :width="140" :height="187" :src="item.img" />
      </div>
      <h3 class="common-overline">
        {{ item.title ? item.title : '' }}
      </h3>
      <p class="common-overline">
        {{ item.tips ? item.tips : '' }}
      </p>
    </div>
  </div>
</template>

<script>
import ImgAspect from '~/components/ImgAspect'
export default {
  components: {
    ImgAspect
  },
  props: {
    detail: {
      required: true,
      type: Array,
      default: () => []
    }
  }
}
</script>
<style lang="less" scoped>
    .home-content-template {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        .recomment-content {
          flex: 0 0 46%;
          cursor: pointer;
          margin-bottom: 20px;
          img {
            width: 100%;
            height: 100%;
            border-radius: 6px;
          }
          .w140-187 {
            width: 100%;
          }
          .w140-187 {
            aspect-ratio: 141 / 187;
          }
          h3 {
            font-size: 16px;
            margin-top: 8px;
            color: #fff;
            line-height: 24px;
          }
          p {
            font-size: 14px;
            color: #aaa;
          }
        }
        .recomment-content:nth-of-type(odd) {
          margin-right: 20px;
        }
    }
</style>
